package com.man.net;

import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.UnknownHostException;

public class AddressTest {
	public static void main(String[] args) throws UnknownHostException {
		InetAddress id=InetAddress.getLocalHost();
		System.out.println(id.getHostAddress());
		System.out.println(id.getHostName());
		
		InetAddress idd=InetAddress.getByName("PC-20141129FOXM");
		System.out.println(idd.getHostAddress());
		System.out.println(idd.getHostName());
	}
}
